import {Pipe, PipeTransform} from "@angular/core";

@Pipe({name: 'empty'})
export class EmptyPipe implements PipeTransform {
  transform(value: string, replaceWith: string): string {
    let replaceWithText = replaceWith ? replaceWith : '无';
    return value == undefined || value == '' ? replaceWithText : value;
  }
}
